package org.jeecg.modules.degression.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.degression.pojo.MlccCategoryInfo;
import org.jeecg.modules.degression.pojo.MlccModuleSmallTemplate;
import org.jeecg.modules.degression.pojo.MlccPriceSystemPinglei;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface MlccPriceSystemPingleiMapper extends BaseMapper<MlccPriceSystemPinglei> {
    /**
     * 查询成本项列表
     *
     * @param page         分页器
     * @param category     类别
     * @param businessType 业务类型
     */
    IPage<MlccPriceSystemPinglei> listPrice(@Param("page") Page<MlccPriceSystemPinglei> page, @Param("category") Integer category, @Param("businessType") Integer businessType);

    /**
     * 查询定制项下的小模块
     *
     * @param categoryid 类别ID
     * @param code       小模块编码
     */
    MlccModuleSmallTemplate selectSmallMotule(@Param("categoryid") Integer categoryid, @Param("code") String code);

    /**
     * 查询定制项下的小模块 (下拉模式)
     *
     * @param categoryid 类别ID
     */
    List<MlccModuleSmallTemplate> selectSmallMotule2(@Param("categoryid") Integer categoryid);

    /**
     * 获取定制项
     *
     * @param id
     */
    MlccCategoryInfo getCategory(@Param("id") String id);
}
